package com.java1412.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author java1412
 * @since 2023-10-27 16:52:49
 */
// 作为feign客户端
// value：指定是注册中心的应用名称
// fallback：指定的兜底方法所在的类，同名方法使用同名方法的兜底方案
@FeignClient(value = "SERVICE-HI", fallback = SchedualServiceHiHystrix.class)
public interface SchedualServiceHi {
    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    public String sayHiFromClientOne(@RequestParam(value = "name", required = false, defaultValue = "java1412") String name);
}
